Réponse apportée
Indices on the left side are not compatible with the size of the right side error
It's a typo in this line M(i_x,i_theta)= 1200*sind(theta(i_theta)) +400*cosd(theta)*x(i_x); I think it should be M(i_x,i_thet...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
if statement for a matrix
You don't need the loop, just using logical indexing: plot(x(x>10&x<25),y(x>10&x<25))

plus de 7 ans il y a | 1

Réponse apportée
creating a function getting the graident and passing variables to them
Is this that you want? syms f(x1,x2) f(x1,x2)= 100*(x2-x1^2)^2 + (1+x1)^2; gr(x1,x2) = gradient(f,[x1,x2]) Then you can comp...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to generate a file name by combining variable characters based on the input of the matlab?
Try this: name='abc'; a_value = 0.90; b_values = [20 10 -5 60]; c_value = 4; output_file = ['output_file_' name '_value' ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to add right ylabel with complex values (attached data and code)
yyaxis right https://es.mathworks.com/help/matlab/ref/yyaxis.html

plus de 7 ans il y a | 0

Réponse apportée
How do you identify strings with numbered names in an array?
a= {'Default ',2; 'Default 2',4; 'Card 1 2',6}; res = {'Default '; 'Card 1 '}; res{1,2} = sum(cell2mat(a(startsWith(a(:,1),res...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Write this without a for loop?
If audioVec is a column array and you ensure that (delaySamples)*EchoGain is a valid index: c = delaySamples+1:length(audioVec...

plus de 7 ans il y a | 0

Réponse apportée
writetable to (.xlsx file) blank output
Apparently writetable(table,'name.xls','Sheet',2) should work. I think the problem is the name of the variable, table is a mat...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
legend for hold function
I think there is no 'DisplayName' property for a legend, it is aproperty of a chart, but you can do the same as you want just pu...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Error 'Undefined variable "hisFtrs" or class "hisFtrs".'
At least in those lines of code you haven't defined hisFtrs variable. Can it be histFtrs?? If this is not the answer please prov...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to save save split images in multiple filenames?
That solves your problem? for i=1:5 imwrite(imread('gi2.tif',i),['im_' num2str(i) '.tif']); end

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
We need to know what type of variables the inputs are, give us an example please By the way, zeros(N) is an NxN matrix and you ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
show part of filenames using uigetfile
Is that that you need? filename = uigetfile('test*.mat')

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
MATRIX DIMENSIONS MUST AGREE error while input strings/char
Use ~strcmp(A{i},B{j}) instead of A{i} ~= B{j}

plus de 7 ans il y a | 0

Réponse apportée
how to load values of two matrices into one matrix?
tmp = 1:length(A)+length(B); h = zeros(length(A)+length(B),1) h(mod(tmp,2)==1) = A h(mod(tmp,2)==0) = B

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
differential equations without ode solvers
I think you are overwriting h1 and h2 variables in: h1= 0.5-0.065*sqrt(h1(i)); h2= 0.065*sqrt(h1(i)) - 0.1*sqrt(h2(i)); After...

plus de 7 ans il y a | 0

Réponse apportée
How to divide the input data for two levels in matlab
I don't know if I have understood your question, but this code split your variable in two: a = temp(1:ceil(L_total/2)); b = te...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
"Subscripted assignment dimension mismatch" error
Your code fails in this line: LST(i)= n(i)+(1/15)*(-Long_rad)+E_solar_rad; The problem is that the rigth side of the equation ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Unable to perform assignment because the size of the left side is 1-by-144 and the size of the right side is 1-by-114.
Probably the problem is that (idx1i(i): idx1f(i)) it's not of 144 size. You probably need to put the range in t1_r variable, for...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Invalid expression error when i execute code
You can't use numbers as a variable names. Valid variable and function names begin with an alphabetic character, and can conta...

plus de 7 ans il y a | 0

| A accepté