Answered
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
The alignment changes when for example a matrix with certain rows and columns is edited using a code button in the new editor ...

7 years ago | 0

Answered
for loop question help
Read about logical indexing and labels without loop (efficient) x=linspace(-2*pi,2*pi); g(x<pi)=cos(x(x<-pi))+2; idx = ( x >...

7 years ago | 0

Answered
another user defined function question
x = [0, 103, 0, 105, 104, 0, 99, 100, 0, 102, 0, 107, 105] RESULT=noofzeros(x) %function calling [MEAN,MAX] = meanmax(x) %fu...

7 years ago | 1

| accepted

Answered
user defined functions help
without loop (efficient) v=[-5, 2, -4, 1; 0, -9, -9, 20; 50, 89, 99, 100] result = numbergreaterthan10(v) %function calli...

7 years ago | 1

| accepted

Answered
MATLAB calculation bug in loop
use format longg % nothing wrong in your calculation it's scientific notation at the very beginning of your code see form...

7 years ago | 0

| accepted

Answered
how to present this function in matlab to see the output signal
syms x(t) x(t) = cos(10*pi*t) fplot(x(t)) syms x(n) x(n) = 1+2*n-3*n^2 figure fplot(x(n))

7 years ago | 1

| accepted

Answered
ReqIF export from Simulink Requirements
use xmlwrite()

7 years ago | 0

Answered
Why vector don't equal when differentiating sin(pi*x)
see subs() (link) to better understand x= linspace(0,4); s= sin(pi*x); subplot(2,1,1); plot(x,s); axis([0 4 -4 4]); subplo...

7 years ago | 1

| accepted

Answered
How can I add legend or color index to my scatter function
legend({'LAT Vs Long'});

7 years ago | 0

Answered
why does my script not open the input file provided?
filename = input('Please provide the name of the input file:','s'); % will work for reason see https://www.mathworks.com/help...

7 years ago | 1

| accepted

Answered
simulink problem in connecting vector concatenate to goto block
see https://www.mathworks.com/help/simulink/slref/goto.html it says it accepts vector as input? vector = [ 5 1 ] vector(:)

7 years ago | 0

Answered
How do you vary a number inside of a matrix?
Without loop (efficient) input1=1:100; %edited after stephen's comment N=numel(input1); x=[input1.' repmat([8 5],N,1)] With...

7 years ago | 0

Answered
Help with rotation any single matrix of 3D matrix by 90 degrees
A = rand(5,4,3); A1=rot90(A(:,:,1)) %first page matrix rotated 90 degrees A1(1,:)=rand(1,size(A,1)) %first row inse...

7 years ago | 0

| accepted

Answered
Index exceeds the number of array elements (1)
should be g.*(t.^2) % not g(t.^2)

7 years ago | 1

| accepted

Answered
Hai, I had trouble to run the code. When I am run the code, it says that Undefined function or variable 'EulerSolve'.
probably you need to contact the author for getting Eulersolve function

7 years ago | 0

Answered
Does anyone know how to format the numeric entries in a Table Reporter?
Doesn‘t this help? P.S - I don‘t have report generator. I believe sprintf() with specific format should solve your problem....

7 years ago | 0

Answered
Timestamp char or cell into double matrix
datetime()

7 years ago | 0

Answered
How to convert time in nanosecond to numeric value in order to be able to compare these timeseries?
T=readtable('mycsv.csv') datetime(T{:,1},'InputFormat','HH:mm:ss.SSS') %highly recommended

7 years ago | 0

| accepted

Answered
xlsread error, wont open file
Make sure Prelab excel file is there in the path as the error message clearly states that there is no such file

7 years ago | 0

Answered
Rotation about a point
x=[1 2 7 1]; y=[1 4 2 1]; fig=figure h=plot(x,y) center = [1 3]; rotate(h,center,-60) title('ROTATED TRIANGLE @CENTER (1,3...

7 years ago | 0

Answered
How to create LaTeX tables?
https://www.mathworks.com/matlabcentral/answers/162636-latex-interpreted-to-matlab#answer_158929

7 years ago | 0

Answered
How do I stop ode solver when output is complex number?
see https://www.mathworks.com/matlabcentral/answers/282449-how-to-stop-ode45-when-one-of-states-reach-certain-value#answer_220...

7 years ago | 0

Answered
How to include different values for x-ticks
see release notes for tick labels available from 2016b x=[2 5 3 7 10]; y=[10 13 15 7 3]; plot(x,y) xticks(linspace(x(1),x(e...

7 years ago | 0

Answered
How to make two spaces a delimiter?
dlmwrite(filename1,M,'-append','delimiter','\t')

7 years ago | 0

| accepted

Answered
Why do I get "Argument to dynamic structure reference must evaluate to a valid field name" error please? code attached.
instead of FC= (1/60)*(6000/(1+exp.(4.96711-2.48356.*log10(DI.*100)))); ^-------causes error ...

7 years ago | 0

| accepted

Answered
many plots within one plot using functions to draw the plots
use hold on %after plot command

7 years ago | 1

Answered
Curve fitting to an excel file
use interp1() with suitable method: a = 133; % area of surface mm^2 Area = pi*a^2; %Want to plot Sigma v L W1 = 0.01; W2 = ...

7 years ago | 1

| accepted

Answered
Write a MatLab function so that one can input F(n) to output the nth Fibonacci number by using the fact that [1,1;1,0] * F(n-1) = F(n).
https://www.mathworks.com/matlabcentral/answers/418742-help-with-my-fibonacci-sequence-code#answer_336563

7 years ago | 0

Answered
Problem with for loop
your loop produces eight elements but you already defined the first element for each variable as 0 , if you want to know what i ...

7 years ago | 0

Answered
Preallocate an matrix in 2 for loops
N=numel(A); B=zeros(N,N); %This is how for j=1:N for i=1:N B(j,i)="Calculation here" end end

7 years ago | 0

| accepted

Load more