Community Profile

photo

Ameer Hamza


Last seen: Today

Hong Kong Polytechnic University

3 827 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
How to implement a Matlab code that choose from random questions?
You can use randperm() to generate a sequence of random numbers without repetition. For example, if you have a database of 100 q...

environ 7 heures ago | 1

Answered
Are handle classes the fastest containers?
There is a performance overhead for using handle classes if you try to access its properties repeatedly. This thread summarizes ...

environ 7 heures ago | 0

Answered
What function to use to solve an equation for a variable that's on both sides of the equation?
Also see solve() function: https://www.mathworks.com/help/symbolic/solve.html.

environ 7 heures ago | 0

Answered
Saving a 1xn Bar plot as a jpg
saveas() is quite an old function and not suitable for getting high-quality images. If you are using a recent version of MATLAB,...

environ 7 heures ago | 0

Answered
The value of the RMSE is hight
You can increase the neurons in hidden layers of your ANN model or increase the number of hidden layers to decrease RMSE. Howeve...

environ 7 heures ago | 0

| accepted

Answered
How to plot this on a graph
There is no 'x' in your expression inside symsum(). I guess you are tyring to plot taylor series of exp(x). Try this syms n x ...

environ 7 heures ago | 0

| accepted

Answered
plot two time series datasets from different years on the same plot ignoring the year
Refer to the answer here: https://www.mathworks.com/matlabcentral/answers/440517-how-to-remove-period-stamp-in-datetime-plot Y...

environ 8 heures ago | 0

Answered
AcitiveX commands in Mac OS?
Yes, it is true, ActiveX is only supported for Windows. That script will not run on macOS. Note this is not MATLAB's limitation,...

environ 9 heures ago | 0

| accepted

Answered
Temperature distribution contour plot
You first need to use scatteredInterpolant to convert the data to a grid format and then call contourf(). Since you have very fe...

environ 9 heures ago | 0

Answered
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
In MATLAB, the input argument in the function definition must be variables. You are writing constant values. Change the function...

environ 9 heures ago | 0

Answered
How to get only real value for equation?
Use nthroot() command y = 0.6447; z = nthroot(y-1, 3)

environ 9 heures ago | 1

| accepted

Answered
how can i create a vector long n arrows and with same string text inside all the arrows
I think you mean 'rows'. Try this M = repmat('31S', 23824, 1)

environ 9 heures ago | 0

| accepted

Answered
Selecting pixel of image
This is equation for 2D convolution. Use conv2(): https://www.mathworks.com/help/matlab/ref/conv2.html. For example, I; % your...

environ 10 heures ago | 0

Answered
Output argument 'x' is not assigned on some execution paths.
Ok. I suspect you are trying to run this code on Simulink in the MATLAB function block. Since you didn't provide this informatio...

environ 11 heures ago | 0

| accepted

Answered
Find the structure name which created the variable
Not possible in MATLAB. A somewhat similar thing can be done by creating a custom handle class and define a parent property, bu...

environ 11 heures ago | 0

Answered
Subtracting two numbers gives 0 as answer
You are getting zero because the images are probably in uint8 format and negative results are given a value of zero in that case...

environ 11 heures ago | 0

| accepted

Answered
How to group values to display in bar charts while doing data analysis
See retime(): https://www.mathworks.com/help/matlab/ref/timetable.retime.html Even using splitapply() with findgroups() will b...

environ 11 heures ago | 1

| accepted

Answered
Probability density function for a time series of pressure data
You can use histogram() with pdf normalization. However, your data points seem to have a different distribution data = readmatr...

environ 11 heures ago | 0

Answered
Delete some matrix rows that contain zero values in some part
Try this idx = any(A(:,1:8), 2); A = A(idx, :); A = [ 31251 31252 31261 31260 31372 31373 31382 31381 3 3 0 0 0 0 31252 3...

environ 12 heures ago | 0

Answered
error of min() function in matlab function block in simulink (v 2018b)
According to documentation, the 'all' option is not supported for code-generation in R2018b (i.e., it will not work in Simulink)...

environ 12 heures ago | 1

| accepted

Answered
Is there any way to get numerical result from symbolic function?
If you have a symbolic function, you can directly evaluate by giving the input. For example syms x y(x) = x.^2 + 2*x + 3; % sy...

environ 13 heures ago | 0

| accepted

Answered
3D - Surface Response Plot - Surface of best fit
If you have a curve fitting toolbox, you can use fit(): https://www.mathworks.com/help/curvefit/fit.html function with fitype ch...

environ 13 heures ago | 0

| accepted

Answered
Get pixel where the intensity is 255
img; % 2048x2448 matrix [r, c] = find(img==255); % r and c contain all row and columns If you want to mark these points on the...

environ 14 heures ago | 1

| accepted

Answered
How can i find a value?
interp1(): https://www.mathworks.com/help/matlab/ref/interp1.html does exactly this. x; % x-values from excel file y; % y-valu...

environ 15 heures ago | 0

Answered
Will poly2sym command always show the output like this ?
By simplified view do you mean something like this If yes, then add the following line at the end of your code vpa(c,4)

environ 15 heures ago | 0

Answered
移動平均値を求めたい
See movmean(): https://www.mathworks.com/help/matlab/ref/movmean.html. For only using past values, write in like this x; % sign...

environ 16 heures ago | 1

Answered
Parametric Solving Equations with Constraints
You can use assume() to tell MATLAB about these constraints. For example syms a b x y d e assume(x>0) assume(y>b) eq1= ...

environ 16 heures ago | 0

Answered
RTX 3080 recompiling issue in Matlab 2020a
The new GPU series by NVIDIA is powered by Ampere Architecture. MATLAB still does not support this GPU properly. You will notice...

environ 16 heures ago | 1

Answered
How can i find results of functions for symbolic points?
You need to assign value of x1, x2, and u seperately. The following code works without error syms t x1 = 1 - (14284088626631...

environ 16 heures ago | 0

| accepted

Answered
How to solve this
Following shows how to find a numerical solution. You ODEs seems stiff, therefore, I used a stiff solver (ode23s). tspan = [0 1...

environ 16 heures ago | 0

| accepted

Load more