Community Profile

photo

Ameer Hamza


Last seen: Today

Hong Kong Polytechnic University

2,572 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
Creating a conditional variable or function such that
Try this schoolID = [1001 1001 1005 1005 1018 1018 1018]; enrollment = [22 22 29 29 22 22 22]; grps = findgroups(schoolID)...

4 hours ago | 1

| accepted

Answered
Is matlab function distance is broken ?
You need mapping toolbox to use this function: https://www.mathworks.com/products/mapping.html

5 hours ago | 0

| accepted

Answered
How to know results
Your current code does not solve the problem, as you described. You need to use for-loop a=2, c=1, d=2 , g=0.5, k=2 , f=2 e=[...

1 day ago | 0

| accepted

Answered
load txt file in matrix into matlab
As Madhan mentioned that you might want to load it as symbolic, you may try str = fileread('test.txt'); words = regexp(str, '\...

1 day ago | 0

Answered
Problem with definite Integral
If you check at the expression of 'f', you can see it also has 't'. So even if you try to numerically integrate it w.r.t. 'r' an...

1 day ago | 0

| accepted

Answered
even distribution in Matlab
y = rescale(rand(1, 1000), 800, 1200)

1 day ago | 0

Answered
How can I update gauge value display during a function?
Use drawnow for i=1:100 app.Gage.Value=i; drawnow % code

1 day ago | 0

Answered
Problem with playing audio file from App Designer
I think you have named your own app "audioplayer". You can check it using which audioplayer If it shows the path your .mlapp f...

1 day ago | 0

| accepted

Answered
How to bypass empty fields in structure when loading data?
Use isstruct(): https://www.mathworks.com/help/releases/R2020a/matlab/ref/isstruct.html. For example, use the following if condi...

1 day ago | 0

Answered
How to publish symbolic matrices in latex format in MATLAB?
You may try Live scripts. It renders the symbolic matrices in mathematical notation and allows you to get latex code directly. F...

1 day ago | 0

Answered
Share function output within callback with another callback in App Designer
You can do so using properties. Switch to code view, and on the toolbar, click the "Property" button to add a new property to yo...

1 day ago | 1

Answered
How to plot 3 different data in contour or pcolor ?
p = pcolor(dt, nw_bin, sizdist) shading interp xlabel('x'); ylabel('y'); colorbar

1 day ago | 1

| accepted

Answered
How to extract data from simulink to work space in matlab?
Try "To workspace" block: https://www.mathworks.com/help/releases/R2020a/simulink/slref/toworkspace.html

2 days ago | 0

Answered
How to fit the data with 2 term power law function?
taking log() of the equation make it very easy to find the parameter (because the equation is linear in term of a and b). Try th...

2 days ago | 0

| accepted

Answered
How can I make variable value instead of constant one?
You need to use element-wise operators a = 1.27; b = 0.19 ; c = 0.44 ; d = 0.2 ; e = 300 ; f = 5*10^21 ; g = 2*10^23 ; h = 1.2 ...

2 days ago | 0

| accepted

Answered
Not effective validation algorithm for input format
Try this vx=zeros(1,4); vy=zeros(1,4); vertices=['A'; 'B'; 'C'; 'D']; fprintf('\nPlease enter the coordinates of vertices:\n...

2 days ago | 0

| accepted

Answered
Separating string element by two and creating a vector in Simulink
See the attached file (created in R2019b). The following image also shows the block needed to do the conversion.

2 days ago | 0

| accepted

Answered
Grouping the bar graph
Try this clear all clc training=5; sheetname='Result'; freezePercent = zeros(training, 10); for i=1:training freezePe...

2 days ago | 0

| accepted

Answered
Plot each image on the same figure. Use enough time increments so that the period of the largest frequency of oscillation has about 40 time increments per period
You can do something like this t = 0:0.001:10; y11 = 0.2763*cos(1.59*t) + 0.7237*cos(3.39t); y12 = % 1st equation for y2 y21...

3 days ago | 0

Answered
To smooth the 3D track by using low pass or sgolay filter.
Try this a = [0 9 10 9 8 7 6 4 2 -12 4 3 5 8 7 11 14 6 5 0 -4 -3 -15 -11 -9 -4 0]; b = [0 0 5 10 2 10 7 12 6 12 14 20 18 12 17...

3 days ago | 0

| accepted

Answered
hello everyone! I need to extract some data out of my table and I am facing the following problem. can anyone help?
Try this Pos = vertcat(F1.Position); f1 = Pos(:,1); f2 = Pos(:,2); f3 = Pos(:,3);

3 days ago | 0

| accepted

Answered
How to create an independent image after drawing a ROI
See exportgraphics(): https://www.mathworks.com/help/releases/R2020a/matlab/ref/exportgraphics.html [R2020a] saveas(): https://...

3 days ago | 1

| accepted

Answered
Operations in structure with N fields named sequencially.
Try this y = mean(structfun(@mean, s));

3 days ago | 0

| accepted

Answered
How to store strings in a matrix or table?
If the end goal is to write these values in excel, the following will work (R2019a and later) A = compose('a%d', reshape(1:12, ...

4 days ago | 1

| accepted

Answered
How to derive a response plot?
See this example sys = tf(1, [1 2 10]); [y, t] = impulse(sys); dy = gradient(y, t); plot(t, y, 'r', t, dy, 'b') legend({'y'...

4 days ago | 1

| accepted

Answered
Contour in a 3D surface plot
contour() object have an undocumented property named ContourZLevel: https://stackoverflow.com/a/8055468/4346708. For example, [...

4 days ago | 0

Answered
How to access elements of all field of structure in same loop
To access name filed, the following for-loop works for i =1:length(student) name{i} = student(i).name end However, for-l...

4 days ago | 0

Answered
how to assign same value according to each subgroup
Try this M = [ 11005 1 11005 2 11006 1 11006 2 11009 1 11010 ...

4 days ago | 0

| accepted

Answered
How to replace any number of repeating characters in a string or character array
Something like this str = fileread('test.txt'); new_str = regexprep(str, ':\.{2,}', ',') Result new_str = 'Riots, Tips ...

4 days ago | 0

| accepted

Answered
How to bypass a directory that is not exist?
See exist() function https://www.mathworks.com/help/releases/R2020a/matlab/ref/exist.html. Call it with with search type 'file' ...

4 days ago | 1

| accepted

Load more