Community Profile

photo

Ameer Hamza


Last seen: Today

Hong Kong Polytechnic University

3.639 total contributions since 2016

3.1416

Contact

Ameer Hamza's Badges

  • MATLAB Central Treasure Hunt Finisher
  • Scavenger Finisher
  • 6 Month Streak
  • Ace
  • 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
How to print in a text file?
A slightly unusual way but it works x=[1;2;3]; U=[1 2 3; 4 5 6; 7 8 9]; f = fopen('data.txt', 'w'); fprintf(f, 'This is th...

alrededor de 2 horas ago | 1

| accepted

Answered
Generate a 100000x100000 matrix that takes less time and memory
If most of the elements equal to zero, then use sparse array: https://www.mathworks.com/help/matlab/ref/sparse.html. You can als...

alrededor de 14 horas ago | 2

Answered
Problem in exporting vector with Matlab R2016a
xlswrite is used for writing to MS Excel files. Use dlmwrite() dlmwrite('vector.txt', x')

alrededor de 15 horas ago | 0

Answered
Assign values of .mat files into matrix
One of the major problem is naming the variables like this x1, x2, ...: https://www.mathworks.com/matlabcentral/answers/304528-t...

alrededor de 15 horas ago | 0

Answered
How can I have two different scales within the same axis on a plot ?
Refer to my answer here: https://www.mathworks.com/matlabcentral/answers/601147-extending-specific-y-axis-values.

alrededor de 15 horas ago | 0

Answered
Creating a timeseries using number of rows
Try something like this t1 = datetime('04-Jan-2015 00:00', 'Format', 'dd-MM-yyyy HH:mm'); t2 = datetime('07-Jan-2015 00:00', '...

alrededor de 15 horas ago | 0

Answered
How to compare two variables data by using ifelse? if both variable contain same number and length of data, so condition becomes true it should perform desired functionality.
data and a,b,c,d have different dimensions. Use isequal() if isequal(data, a) value =1 elseif isequal(data, b) value...

alrededor de 15 horas ago | 1

Answered
Graphing a nonlinear 2nd order differential equation?
See ode45(): https://www.mathworks.com/help/matlab/ref/ode45.html espically the example titled "Solve Nonstiff Equation". IC = ...

alrededor de 15 horas ago | 1

Answered
why it showing ((Warning: Image is too big to fit on screen; displaying at 67% )) ?
This means that your image has more pixels, then your screen can fit. This is not an error, just a warning. You can suppress it ...

alrededor de 16 horas ago | 0

Answered
Removing rows in a matrix
Try this n = size(Identify_3); idx = (mod((1:n)-1, 6)+1) <= 2; Identify_3 = Identify_3(idx, :);

alrededor de 16 horas ago | 0

| accepted

Answered
Solve the system of equations by putting them in matrix form for the unkown voltages v1-v4
Read about linsolve(): https://www.mathworks.com/help/matlab/ref/linsolve.html or ldivide: https://www.mathworks.com/help/matlab...

alrededor de 16 horas ago | 0

Answered
How do i read binary file
Try this fileID = fopen('test.bin'); precision = '1*uint8'; fseek(fileID, 8, 0); % skip 8 bytes B = fread(fileID,[1,7],preci...

alrededor de 16 horas ago | 0

| accepted

Answered
How to remove spaces from a string using while if or for/
It is important that you traverse the string from the end toward the beginning. c = 'that is some tick stuf f f'; l = numel(c)...

alrededor de 17 horas ago | 1

| accepted

Answered
How to replace elements in a matrix using logical
Try this X = [ 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4]; tf = ...

alrededor de 17 horas ago | 0

Answered
Solve an equation, answer not solved
It is giving you symbolic solution. You are probably looking for a numeric solution. Use vpa() or double() syms deltax eqn = -...

alrededor de 17 horas ago | 0

| accepted

Answered
hope the plotting graph
Try this x = linspace(20,100000); y = 20*log(1./(1+(2*(3.14)*(x)*(102*10^-9)*(985.1)).^2).^0.5); plot(x,y) Read about eleme...

alrededor de 17 horas ago | 0

Answered
computation on each column in matrix - projecting the Matrix onto a plane
Try this p0 = [0; 0; 0]; %the point in my new plane, the one I am gonna project onto N = [1,2,3].'; %Normal to the plane which...

alrededor de 17 horas ago | 0

Answered
how can i calculate a complex polygon with coordinates in matlab ?
The equation in your comment can be written in MATLAB like this A = 1/2*sum(x(1:end-1).*y(2:end)-y(1:end-1).*x(2:end));

alrededor de 17 horas ago | 0

| accepted

Answered
Solve system of nonlinear equations with matlab
One way is to use fsolve() from optimization toolbox fun = @(x, y) [-2*x.^2+3*x.*y+4*sin(y)-6; ... 3*x.^2-2*x.*y.^2+3*cos(...

alrededor de 18 horas ago | 0

Answered
Unable to find explicit solution
This warning message shows that MATLAB is not able to find an analytical solution for your equation. You need to substitute the ...

alrededor de 19 horas ago | 0

Answered
I need a help on making the number calculation into matrix calculation
Read about array indexing in MATLAB: https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html clc...

alrededor de 20 horas ago | 0

Answered
Zero phase filter using specific filter coefficients
Read about filtfilt(): https://www.mathworks.com/help/signal/ref/filtfilt.html from signal processing toolbox.

alrededor de 20 horas ago | 0

Answered
Loop with different outcome name
Creating variable names like y1, y2, ... is not a good coding practice and highly non-recommended: https://www.mathworks.com/mat...

alrededor de 20 horas ago | 0

| accepted

Answered
how to put them text lines into loop to reduce the coding line?
Try this yv = [0.038 0.028 0.02 0.013 0.0076 0.004 0.0015 0]; hold on for i = 1:numel(yv) text(1.688, yv(i), sprintf('ol...

alrededor de 20 horas ago | 0

Answered
How to find optimum parameters for a NARX model
You can use the nlarx function(): https://www.mathworks.com/help/ident/ref/nlarx.html to progammatically estimate the parameters...

alrededor de 20 horas ago | 0

Answered
Interpolation of data at each specific value in the variable
See interp1(): https://www.mathworks.com/help/matlab/ref/interp1.html. You can probably do something like this distance; % your...

alrededor de 22 horas ago | 0

Answered
Change colorbar title position latex
Try something like this c = colorbar; c.Title.String = '$\omega(1/s)$'; c.Title.Interpreter = 'latex'; c.Title.FontSize = 16...

alrededor de 22 horas ago | 0

| accepted

Answered
Does Any one know what am I doing here and what is the solution for it?
This y(i)(1:10:end,:) is not a valid MATLAB syntax. Just use y(i) text(x(i), y(i), 'Width=0.7m', ...

alrededor de 22 horas ago | 0

Answered
hello, could you tell me if the Russian university MAI has a student license, and if so, how to get it
If the university has a campus-wide license, you can find it here: https://www.mathworks.com/academia/tah-support-program/eligib...

alrededor de 22 horas ago | 0

Answered
Linking sections of live script
Once the variable is defined, it is visible to all sections of the Live script. There is no special procedure to access it; you ...

alrededor de 22 horas ago | 0

Load more