Community Profile

photo

Ameer Hamza


Last seen: Today

Hong Kong Polytechnic University

4,457 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
Converting cell array to matrix
Use vertcat() coord = vertcat(centroid1{:}) following should also work coord = cell2mat(centroid1.')

34 minutes ago | 0

| accepted

Answered
How to make the y axis 'counts' and x axis the variable on Histograms
One option is to just rotate the view x = rand(1000,1); histogram(x) view(90, 90) Combining histcounts() with barh() is anot...

42 minutes ago | 0

Answered
Infinite Recursion in own Levenberg-Marquardt Code
Inside the function korrektur, you are again calling korrektur with the same value of input parameter [s,mu]=korrektur(f,DF,x,...

1 hour ago | 1

Answered
imwrite error for saving contents of a cell array in a for loop - "colourmap should have 3 columns"?
Why are you getting the indexed image in frame2im(). Getting an RGB image will make things easier. Change the line to figureIm ...

2 hours ago | 1

| accepted

Answered
How to Select Specific Time Intervals Over a series of time steps
Is the data loaded in MATLAB? If yes, you can do something like this dts; % datetime vector; Transp_val; % Transpiration value...

2 hours ago | 0

Answered
Simulink: Excite System for couple seconds but longer simulation time
There can be several ways, but the easiest might be to use a MATLAB function block: https://www.mathworks.com/help/simulink/ug/c...

2 hours ago | 0

Answered
How to plot scatter graph with colourmap functon
Try this x = myVal(:,1); y = myVal(:,2); z = myVal(:,3); cmap = jet(256); %state colourmaop min_val = min(z); max_val = ...

2 hours ago | 0

| accepted

Answered
multiple function_handle in one function
Instead of defining three function handles, you can defined one vector-valued functions df = @(a) [2.*((sqrt((x1-a(1)).^2 + (y1...

2 hours ago | 1

Answered
Use Matlab online for machine learning
MATLAB online itself does not have enough power to do something serious. For example, it does not have a GPU device. You can run...

3 hours ago | 0

Answered
How to Write y(0)=1?
If you just want to display it, then you can use following code syms J(theta) J(theta)=1 This requires the Symbolic toolbox.

4 hours ago | 0

Answered
How sampling 3d scattered points
One option is to use interp1() X = rand(108, 3); t = linspace(0,1,size(X,1)); t_new = linspace(0,1,32); X_new = interp1(t,...

4 hours ago | 1

Answered
How to find the Fourier transform X(ω)
fourier() works with symbolic inputs syms t x(t) = (t*exp(-3*t)*sin(8*t))*heaviside(t); fourier(x)

4 hours ago | 0

| accepted

Answered
How to use isosurface in app designer?
isosurface() surface is quite an old function and does not support these features. According to the documentation, it will just ...

4 hours ago | 0

Answered
4th order differential equation
If you have symbolic toolbox, then try this syms v(z) P EI eq = EI*diff(v,4) == -P*z v = dsolve(eq) Result from live edito...

4 hours ago | 0

Answered
Read two lines from a file and repeat for next lines
It is more efficient to read everything in a single call. I/O operations on disk can be a bottleneck, so that should be reduced ...

6 hours ago | 0

| accepted

Answered
How to create a variable named from string
Although possible, it is a terrible (cannot emphasize enough) coding practice to create variable names dynamically: https://www....

6 hours ago | 0

| accepted

Answered
Pseudo random sequence matrix from an image
As the documentation specifies, the Y matrix has values in the range [16 235]/255 for the floating-point datatype. You can do so...

6 hours ago | 0

Answered
Grouping of sub arrays
Are you looking for something like this x=[1 1 2 3 3 1 0 4 4 4 1 1 1 1 5 5 0 1 3 3 3 3 1 4 4 4 0 0 1 1 5 6]; Groups = bwlabe...

6 hours ago | 0

Answered
How to create a graph time vs value n
I think it might be better if you move the tic ... toc lines outside the function. For example, remove these lines and then run ...

7 hours ago | 0

Answered
How to separate negative and positive terms in to two different expressions
Try this syms a b c d f g F = a - b*d + g*c - a*c + d*g; parts = children(F); parts = [parts{:}]; assume(symvar(parts)>0)...

7 hours ago | 1

| accepted

Answered
Formatting Matlab's output to Command Window
The format short only applies to native numeric datatypes, e.g., double. Generally, it is preferable to display symbolic calcula...

8 hours ago | 1

| accepted

Answered
MATLAB function cross can be applied to symbolic object but Documentation does not explain?
It works fine in R2020b, are you using an older release? syms x y z vec1 = [x y z]; vec2 = [x y z]; x = cross(vec1, vec2); ...

8 hours ago | 0

Answered
how to add non uniform Noise
What about multiplying the noise matrix with another function. For example M = randn(13); [~,~,Z] = peaks(13); % peaks is just...

10 hours ago | 0

Answered
Plotting 16 plots in one figure using handle graphics
Try this n = 4; dim = 0.8/n-0.05; % considering that the axes will go from 0.1 to 0.9 in figure coordinates ...

11 hours ago | 0

Answered
Array of Numbers with error
What type of noise you you want to add? Following shows an example with normally distributed noise. acc79_18; % data from 1979 ...

11 hours ago | 0

Answered
Why is my functions not plotting a line?
Change the lines in your code like this Wcd=(s.*Wab.*(s+sin(theta)))./(1+s.^2+2.*s.*sin(theta)); %^...

21 hours ago | 2

| accepted

Answered
How to use two colormaps in one imagesc plot?
You can create a new colormap based on the proportion of the individual colormap imagesc(M); colorbar(); caxis([-0.8 1]); cm...

22 hours ago | 1

| accepted

Answered
Read and display RGB png/jpg image
You png file is actually an indexed image with a colormap. You can see it in color using following statements [img, map] = imre...

22 hours ago | 0

| accepted

Answered
Alternatives for passing variables efficiently to anonymous function
Don't bring 'f' as string. Define it as function handle. For example, define f like this f = @(x, LDamperFL, LDamperFR, xSteerR...

22 hours ago | 0

| accepted

Answered
How to use cumsum for single column matrix non integer values
It seems that you have somewhere defined a variable name 'cumsum', which confuses MATLAB by shadowing the built-in function name...

24 hours ago | 0

| accepted

Load more