Community Profile

photo

Ameer Hamza


Last seen: Today

Hong Kong Polytechnic University

3,727 total contributions since 2016

3.1416

Contact

Ameer Hamza's Badges

  • MATLAB Central Treasure Hunt Finisher
  • Scavenger Finisher
  • Master
  • 6 Month Streak
  • Thankful Level 2
  • CUP Challenge Master
  • Promoter
  • Commenter
  • 5-Star Galaxy Level 2
  • Explorer
  • Personal Best Downloads Level 2
  • Editor's Pick
  • First Review
  • First Submission
  • Knowledgeable Level 4

View all

Contributions in
View by

Answered
Error in plotting (blank graph): Vector Size
Check the following code. You don't need to use eta(i+1). v = linspace(0,35,36); v = v * 0.44704; N = length(v); eta = zeros...

7 hours ago | 0

Channel


My MW records

9 hours ago

Answered
Error with solve function
You also need to define other variables as symbolic syms I1 I2 I3 R_s X_s X_m V1 X_r R_r Z1 eqn1 = I1*(R_s + X_s) + I3*X_m == ...

9 hours ago | 0

Answered
how to get simscape electrical?
Simscape Electrical is a toolbox for Simulink. You can buy for your current license by going to your existing page or you can re...

9 hours ago | 0

Answered
Matrix input/output to a Matlab function block in simulink
An alternate way is to create a parameter input in the MATLAB function block and give it the same name as the base workspace var...

9 hours ago | 0

Answered
How to reduce precision of digit after decimal point? Matlab (R2020a)
If you are only concerned with displaying the results with two digits after the decimal, then you can use fprintf a = 334.65980...

9 hours ago | 0

| accepted

Answered
Sort Cell Structure according to specific row
Are you tying to do something like this C; % 2xn cell array [~, idx] = sort([C{1,:}]); C = C(:, idx);

10 hours ago | 0

| accepted

Answered
Finding Transfer Function from Step Response
Another approach can be something like this. Consider the transfer function of the system is and the transfer function of inp...

10 hours ago | 0

Answered
Finding Transfer Function from Step Response
You can do it using the system identification app: https://www.mathworks.com/help/ident/ref/systemidentification-app.html. For t...

12 hours ago | 0

| accepted

Answered
How to solve 3 interconnected equations?
If you have symbolic toolbox, you can use solve() syms M S R Rv = rand(10, 1); eq1 = M == S*3; eq2 = S == R+M; sol = so...

14 hours ago | 0

Answered
How to put a preview figure window in a main figure window
You can create a second smaller axes x=0.01*rand(100,1); ax1 = axes(); [~,edges] = histcounts(log10(x)); histogram(x,10.^edg...

15 hours ago | 0

| accepted

Answered
Reading the arranged file name
natsort() from FEX is exactly made for such cases: https://www.mathworks.com/matlabcentral/fileexchange/47434-natural-order-file...

15 hours ago | 0

Answered
solve linear equation system with partially unknown coefficient matrix
One approach is to find a least square solution using fmincon() x = rand(4, 1); y = rand(4, 1); A = @(a) [a(1) a(2) 0 a(3);...

15 hours ago | 0

Answered
3input vs 1 output Interpolation Problem
You need to use scatteredInterpolant() data = readtable('Data.xlsx'); idx = find(isnan(data.X), 1); data(idx:end, :) = []; ...

15 hours ago | 0

| accepted

Answered
Undefined function or variable 'dumphex'.
dumphex is not a MATLAB's function. Some other similar functions are available on FEX: https://www.mathworks.com/matlabcentral/f...

17 hours ago | 0

Answered
How to write the codes for this?
If you want to find value of 'b' for each value of 't' then try this tv = [89;132;202;263;321;362;421;473;575;663]; syms b t ...

18 hours ago | 1

Answered
How to synchronize non timeseries data?
By synchronize, if you mean having the same x-values for both datasets, then use intep1(): https://www.mathworks.com/help/matlab...

18 hours ago | 0

Answered
ODE45 solving for three variables
You need to write as a function or a function handle dydt = @(t, y) [y(2); y(3); -24*y(1)-26*y(2)-9*y(3)]; y0 = [1 -4 -14]; t...

21 hours ago | 0

Answered
break up filtered EMG data into epochs
Try something like this t = linspace(0, 10, 1000); eeg_signal = rand(size(t)); % eeg-signal grps = ceil((t+eps).'/1.5); ee...

21 hours ago | 0

| accepted

Answered
Sorting an array without sort() command
What you described is called selection sort. This FEX package have code for all commonly know sorting algorithms, including the ...

21 hours ago | 0

Answered
Finding a value (or not a value) inside a matrix
Try this code Bingo_board = randi([1 100],5,5) x = randi ([1,100], 1) if any(Bingo_board(:)==x) disp('Match found.'); ...

1 day ago | 0

Answered
Anyone know why it isnt accepting my cos(2x) ?
x = -pi:2*pi; f = cos(2.*x); % f(x) is wrong plot(x, f)

1 day ago | 0

| accepted

Answered
Polynomial with nested and anonymous functions.
Something like this polynomial = sum(p .* x.^(0:numel(p)-1)); Also see polyval().

1 day ago | 1

| accepted

Answered
Seperating columns into rows
Use reshape() B = 1:10; A = reshape(B, 2, [])

1 day ago | 1

| accepted

Answered
Getting error while importing numpy in MATLAB
This issue happens in the latest versions of numpy. Following will work x = py.numpy.linspace(0, 10, py.numpy.int(101))

1 day ago | 0

Answered
Boxplot function not working
boxchart was introduced in 2020a, and you don't need that toolbox to use it.

1 day ago | 0

| accepted

Answered
How to delete row or column in x.mat file
Does X.mat file only have one variable? In that case, try X(501:2000,:) = []; %^ put : here Also, If the variable is very...

1 day ago | 0

Answered
Is it possible to remove a certain character (dash sign / -) from an entire column in a table.
It can work on table as well. Try something like this T.x = erase(T.x, '-')

1 day ago | 0

| accepted

Answered
Integration error while running a script in Matlab 2015
me=int((rho*Ao*(1-(0.5*x)/L))*(psi)^2,x,0,L)+mR*subs(psi,x,xc); % ^ insert * here. It is missing in your code

1 day ago | 0

Answered
Unrecognized property CData for class UIAxes
CData is the property of Image object (returned by imagesec), not the UIAxes. You need to specify the correct handle in the set(...

1 day ago | 0

Load more