Answered
How to create if loop
if row~=column resize... end

8 years ago | 0

| accepted

Answered
Copy one matrix into another
c=rand(9,9) %an example a=ones(3,3) c(4:6,4:6)=a

8 years ago | 3

| accepted

Answered
How to solve Index in position 1 exceeds array bounds (must not exceed 120).
please read <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=2ahUKEwiU4uLF2rreAhULLI8KHRzvCyI...

8 years ago | 0

Answered
Why is my for loop not iterating in the way I want?
x=2; expapprox=cell(1); expapprox(1)={0}; expapproxarray=zeros(1,12); error1=cell(1); expapproxarray=ce...

8 years ago | 0

Answered
How can I solv 27/49 a^3 - 3/25 b^2 a ?
how can you subtract when the variables have different degree? All you can do is factor them out: syms a b sol=27/...

8 years ago | 0

Answered
Storing outputs of for loop within an array
Change this to y1=kf*((((nf^2/ns^2)*gammas)+(nf^2/nc^2)*gammac)/(kf.^2-(nf^4*gammac.*gammas/(nc^2*ns^2)))); y2=tan(kf*h)...

8 years ago | 0

Answered
how to have the same shape on matlab?
I suspect both the figures are the same (maybe wrong) just the scalings are different .

8 years ago | 0

Answered
how to solve multiply matris (nxm)*(mxn)?. Please long way.
Maybe simpler: A.*B Or A*B If you still insist doing it your way then see <https://www.mathworks.com/matlabcentr...

8 years ago | 0

| accepted

Answered
Plotting does not work well.
T= 323.15; A1= 4.01814; B1= 1203.835; C1= -53.226; A2= 4.08245; B2= 1346.382; C2= -53.508; Psat1= 10^(...

8 years ago | 0

| accepted

Answered
i have a cell array storing few hundred vectors, how can i write them each line with only one vector to a file.txt without floats?
to avoid unnecessary loop you can: cell_array={[1 2 3 4],[2 3 4 5],[3 4 5 6]}; %EDITED after Stephen's efficient advice ...

8 years ago | 0

| accepted

Answered
Drawfreehand not able to find
you need <https://www.mathworks.com/products/image.html *image processing toolbox*> type ver in command window , if ...

8 years ago | 0

Answered
ode45 solver not getting solved showing busy for indefinite time
t = [0 10] y0 = [0 0 0 0] [t,y]= ode45(@myfunc2,t,y0); %function calling plot(t,y(:,1),'r') %plots soluti...

8 years ago | 0

Answered
How to calculate radius of contour of Gaussian function
just use grid on and read it from the points on the graph , I think it is the easiest way

8 years ago | 0

Answered
how can i adjust y scale in this graph
use <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwiwwcrNj7reAhXEYo8KHf_sBVQQFjAAe...

8 years ago | 0

Answered
hi. i´m new in matlab and i can´t solve a ode using ode45 :(
syms x(t) %EDITED cc=2; to=3; eqn = diff(x,2) == -2.*(cc./(1+(cc.^2).*((t-to).^2))) + 2.*(1-x).*(t-to).*(cc^3)./((1...

8 years ago | 0

| accepted

Answered
I have this coding assignment where I need to read in 2 excel files, multiply them and write the answer into a excel file. I know i'm close but I keep getting an error in the write file line of code.
Try: clear all %at the very beginning _delete or rename any file named xlswrite or xlsread which may also lead to this c...

8 years ago | 0

| accepted

Answered
Animating a simple 3D trajectory
load vector.mat box on plot3([0 1 0 0]', [1 0 0 1]', [0 0 1 0]') axis([0 1 0 1 0 1]); view(135, 13) curve_...

8 years ago | 0

| accepted

Answered
how can i plot a direction for points
coords=zeros(10,2); for i=1:10 coords(i,1)=rand*1000 coords(i,2)=rand*1000 end z=coords(:,1); c=co...

8 years ago | 0

Answered
How to fix my recursive function?
see <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwj5mcK-2bneAhVMpo8KHYQgBwYQFjAAegQ...

8 years ago | 0

Answered
Figureのcolormapが変更できません
x = linspace(-2*pi,2*pi); %see example y = linspace(0,4*pi); [X,Y] = meshgrid(x,y); Z = sin(X)+cos(Y); contour(X...

8 years ago | 0

Submitted


verlin
VERTICAL LINE PLOTTING.

8 years ago | 62 downloads |

0.0 / 5

Answered
Program to calculate the nth Prime Number
Do you even realise that there is an inbuilt function in Matlab to do that? as sir Walter already gave the answer?? Also don't u...

8 years ago | 0

Answered
Activating student version of r2012a offline
<https://www.mathworks.com/matlabcentral/answers/259627-how-do-i-activate-matlab-without-an-internet-connection#answer_202773>

8 years ago | 0

Answered
symbolic integrating only one variable of three
just change your last Line to this: g = int( f(x,z,th1) ,th1, a1,a2)

8 years ago | 0

Answered
How would I replace a string of numbers with more numbers using for and if statements?
t = string([1,2,1,2,1,3]); d=cell(1,numel(t)); %pre-allocation for i = 1:numel(t) if t(i)=='1' d{i}=[o...

8 years ago | 0

| accepted

Answered
Input value and compare to values in an array
M1=input('What is the Mach number? '); Mach=[1.050,1.1,1.2,1.3,1.4,1.6,1.8,2,2.5,3,4,5,6,7,8,10]; Maxd=[0.558,1....

8 years ago | 0

Answered
Find unknown from the equation with limited given value?
syms Me g = 1.24 Me=vpasolve((1/Me)*((2+(g-1)*Me^2)/(g+1))^((g+1)/(2*(g-1)))==100,Me)

8 years ago | 0

| accepted

Answered
Write text to excel file including variable
TRY: dp = 30 t=table(dp,'RowNames',{'pitch diameter'}) writetable(t,'peq.xls')

8 years ago | 0

Answered
How to use bar function
An example: y = [75 91 105 123.5 131 150 179 203 226 249 281.5]; bar(y,0.4,'b') hold on y1=[75.1 125] bar([2.5...

8 years ago | 0

| accepted

Answered
I am planning to 3 sepearate fit line in a graph. But I encounter a problem. How can I solve this?
temp=[30.83600 30.13100 29.33600 27.90400 27.07000 26.31200 25.04400 24.21000 23.38900]; point=[1 2 3 4 5 6 7 8 9]; plot...

8 years ago | 1

| accepted

Load more