Community Profile

photo

Ameer Hamza


Last seen: 9 days ago

Hong Kong Polytechnic University

2,831 total contributions since 2016

Contact

Ameer Hamza's Badges

  • Scavenger Finisher
  • Ace
  • 3 Month Streak
  • Thankful Level 2
  • CUP Challenge Master
  • Promoter
  • Commenter
  • Explorer
  • Personal Best Downloads Level 2
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 1
  • First Submission
  • Knowledgeable Level 4
  • Revival Level 3

View all

Contributions in
View by

Answered
Finding min and max of ODEs
See this example % defining the time range: T=12; trange=[0 T]; % defining initial values (concentrations) for c,s,e i p: c...

1 month ago | 0

| accepted

Answered
How to solve "A and B must be floating-point scalars"?
In a symbolic toolbox, you need to use int() instead of integral to find a symbolic integration. Try following code syms v w x ...

1 month ago | 0

| accepted

Answered
How do I get the equation and display on the graph for line of best fit?
Try this x=[0.200 0.100 0.067 0.050 0.040 0.033 0.025]; y=[0.214 0.158 0.130 0.125 0.136 0.115 0.107]; axis([0 0.025 0 0.02...

1 month ago | 1

| accepted

Answered
Not enough input arguments
It seems that you are trying to solve a matrix differential equation. If you are using ode45, one possible way this error can oc...

1 month ago | 0

| accepted

Answered
How can i use 1d signals as input for classification?
If you refer to deep learning-based classification, MATLAB's deep learning toolbox supports the classification of time-series, f...

1 month ago | 0

Answered
How to make animtion of 3D surface plot?
See this example using variable 't'. Adapt it according to your requirement %suface plot; x=-20:1:20; y=-20:1:20; [x,y]=mesh...

2 months ago | 1

| accepted

Answered
How can I solve this question? And the ODE equation made me confused.
See bvp4c() for boundary condition problems. Something like this EI = 1.3e7; q0 = 30e3; T = 20e3; L = 4; xmesh = linspace...

2 months ago | 1

| accepted

Answered
HELP me!!! eigen value!!!!!
See the eig() function: https://www.mathworks.com/help/releases/R2020a/matlab/ref/eig.html to find all the eigenvalues. Use max(...

2 months ago | 2

| accepted

Answered
how to make a smooth sepectrum??
See smoothdata(): https://www.mathworks.com/help/releases/R2020a/matlab/ref/smoothdata.html. Pass the X_mags vector through smoo...

2 months ago | 0

Answered
How to bulid multiple loops with logic operators
You mistakenly typed 1i (imaginary number in MATLAB) instead of i elseif (stress_w1_1(i) > stress_w1_2(1i)) ...

2 months ago | 0

| accepted

Answered
Patch color error "Vectors must be the same length."
Using for-loop seems to be the simplest solution in this case. x =[ 1 2 1 2 2 3 2 3]; y =...

2 months ago | 0

Answered
Generating Block Matrix Dynamically
This example show how to use blkdiag to create such a matrix M = [0.7071 0.7071 0.7071 0.7071]; n = 4; M_cell ...

2 months ago | 0

| accepted

Answered
Can anyone help with this error? (I just want to see the contour of the bluish area at the bottom of the image)
You need to specify a single channel image to imcontour(). For example, just provide the blue channel imcontour(I(:,:,3), 3) o...

2 months ago | 0

Answered
Saving figures with minimum 300dpi in online matlab
Use exportgraphics() to save the figure exportgraphics(gcf, 'test.jpg', 'Resolution', 300) saves currently active figure windo...

2 months ago | 2

| accepted

Answered
How can I write this exponential function in matlab
One way to write this is to create an anonymous function f = @(t) 0.2*exp(-1i*(8*pi*t-pi/2))+0.585*exp(-1i*(7*pi*t-deg2rad(78.6...

2 months ago | 0

Answered
How to run an .exe file and open an input .txt file to that
If it accepts through command line as an input argument then you can try this system('C:\NEC-PRO16\BIN\NECWINP.EXE input.txt') ...

2 months ago | 0

Answered
How can I write these functions to the press
You can use ode45() to solve such a system of ODEs. ic = [2; 4]; xspan = [0 1]; [x, Q] = ode45(@odeFun, xspan, ic); y_sol = ...

2 months ago | 0

Answered
plotting a matrix values as a bar diagram
See boxplot() or boxchart() boxplot(s.') It will show the range of values in each row.

2 months ago | 0

| accepted

Answered
Split table column into multiple columns within the same table based on a specific delimiter
Try this load('Detections.mat'); val = cell2mat(cellfun(@(str) {sscanf(str, '%f,').'}, Click.avrg_spectrum)); new_table = [Cl...

2 months ago | 0

| accepted

Answered
Renaming multiple subfolders within folder
Something like this files = dir('P_6CMBCF_*'); for i=1:numel(files) filename = files(i).name; new_filename = [filena...

2 months ago | 1

| accepted

Answered
Is it possible to rewrite these equation set to matrix form?
These variables are nonlinearly related, so not sure how do you want to write in matrix form. Also, it is unlikely that it will ...

2 months ago | 0

| accepted

Answered
Can I make MATLAB use a custom copy method when creating an array of my class?
It seems like subsasgn() https://www.mathworks.com/help/matlab/ref/subsasgn.html could be helpful in this case. You can control ...

2 months ago | 1

| accepted

Answered
n th Fibonacci number with function
As compared to using for-loop, an alternative approach is to use a closed-form expression of the Fibonacci sequence as given her...

2 months ago | 0

Answered
Saving heatmaps as image
If you are using R2020a, you can use exportgraphics() ans specify the handle of graphic object. n2E = rand(10); % for example ...

2 months ago | 1

| accepted

Answered
Help me with code to solve for loop to solve ODE
Try this code tspan = [0 500]; ic = [1; 0; 0; 0; 0]; [t, p] = ode45(@odeFun, tspan, ic); plot(t, p) legend({'p', 'p\_dot1...

2 months ago | 0

| accepted

Answered
Dynamically reading cursor location
You can use the WindowButtonMotionFcn callback of the figure object. Run the following example fig = figure(); ax = axes(fig);...

2 months ago | 0

| accepted

Answered
Error using atan2 Inputs must be real.
It gives the value of th4, but the output is in the symbolic format. Convert it into a floating-point value by using double(). C...

2 months ago | 0

| accepted

Answered
How to solve higher order nonlinear ode in matlab?
You need to convert the higher-order (say n-th order) ODE equation into a system of n first-order ODE equations. See this exampl...

2 months ago | 2

Answered
Load and do operations for multiple files in a loop
Try something like this filePattern = fullfile('ATA*.mat'); %the 306 files are in the following format ATA 1....306.mat theFil...

2 months ago | 0

| accepted

Answered
how to interpolate nx2 (x,y) matrix include some NaNs with newton's interpolation.
Since all points in x1 are equidistant, therefore, it is not really relevant in the interpolation. You can use fillmissing(): ht...

2 months ago | 0

| accepted

Load more