Answered

Why F vs T graph are not plotted , it shows only blank figure and how i can get all the values of F and T in the workspace as it shows only last value.

You are not specifying the marker type in plot() and also you are not saving vaues of F at each iteration c1 = 27.742*10.^8; c...

Why F vs T graph are not plotted , it shows only blank figure and how i can get all the values of F and T in the workspace as it shows only last value.

You are not specifying the marker type in plot() and also you are not saving vaues of F at each iteration c1 = 27.742*10.^8; c...

alrededor de 1 hora ago | 0

| accepted

Answered

i want to write code for a question

Although this equation is linear is x, and you can write the equation of x. For a general case, you can use fsolve() c = 0.0038...

i want to write code for a question

Although this equation is linear is x, and you can write the equation of x. For a general case, you can use fsolve() c = 0.0038...

alrededor de 2 horas ago | 0

| accepted

Answered

tf function doesn't work

You need to have the control system toolbox: https://www.mathworks.com/help/control/index.html for using tf() function. It seems...

tf function doesn't work

You need to have the control system toolbox: https://www.mathworks.com/help/control/index.html for using tf() function. It seems...

alrededor de 13 horas ago | 0

Answered

How can I assign a number to another number and then create sequences in which I can swap them at will?

Check this code numbers=1:40; numbers_b=[11:14, 21:24, 31:34, 41:44, 51:54, 61:64, 71:74, 81:84, 91:94, 101:104]; assigned=[n...

How can I assign a number to another number and then create sequences in which I can swap them at will?

Check this code numbers=1:40; numbers_b=[11:14, 21:24, 31:34, 41:44, 51:54, 61:64, 71:74, 81:84, 91:94, 101:104]; assigned=[n...

alrededor de 14 horas ago | 0

| accepted

Answered

Integrate planck function between two intervals

Check this code and compare it with your code to see the mistakes. c1 = 27.742*10.^8; c2 = 1.43878*10.^4; sigma = 5.67*10.^-8...

Integrate planck function between two intervals

Check this code and compare it with your code to see the mistakes. c1 = 27.742*10.^8; c2 = 1.43878*10.^4; sigma = 5.67*10.^-8...

alrededor de 14 horas ago | 0

| accepted

Answered

Plotting coordinate points using plot()

It is giving you points, but the size is so small that they are barely visible. Also, transpose is not needed here. The followin...

Plotting coordinate points using plot()

It is giving you points, but the size is so small that they are barely visible. Also, transpose is not needed here. The followin...

alrededor de 15 horas ago | 0

Answered

Help.. how would i get 7* to 1*

You can run the for-loop in reverse order too N = 7; for mm = N:-1:1 % equivalent to mm = flip(1:N) for nn = 1:mm ...

Help.. how would i get 7* to 1*

You can run the for-loop in reverse order too N = 7; for mm = N:-1:1 % equivalent to mm = flip(1:N) for nn = 1:mm ...

alrededor de 15 horas ago | 0

| accepted

Answered

2d to 3d array conversion

First convert tables to arrays and then use cat() for i=1:14641 a{i} = readtable(strcat('output_',num2str(i),'.csv')); end a...

2d to 3d array conversion

First convert tables to arrays and then use cat() for i=1:14641 a{i} = readtable(strcat('output_',num2str(i),'.csv')); end a...

alrededor de 15 horas ago | 0

Answered

VolumeViewer ScaleFactors not working in R2018b

ScaleFactor was not present in R2018b: https://www.mathworks.com/help/releases/R2018b/images/ref/volumeviewer-app.html?searchHig...

VolumeViewer ScaleFactors not working in R2018b

ScaleFactor was not present in R2018b: https://www.mathworks.com/help/releases/R2018b/images/ref/volumeviewer-app.html?searchHig...

alrededor de 17 horas ago | 0

Answered

expanding a given function as a power series?

You need the symbolic toolbox for this problem! syms x y f(x) = x^3+2*x; g = f(exp(y)); g_approx = taylor(g, y, 'Order', 1...

expanding a given function as a power series?

You need the symbolic toolbox for this problem! syms x y f(x) = x^3+2*x; g = f(exp(y)); g_approx = taylor(g, y, 'Order', 1...

alrededor de 19 horas ago | 1

| accepted

Answered

how to get data from an interval

You can use logical indexing. Add these lines at the end of your code x = sol.x; y = sol.y; idx = (x > 50) & (x < 180); fi...

how to get data from an interval

You can use logical indexing. Add these lines at the end of your code x = sol.x; y = sol.y; idx = (x > 50) & (x < 180); fi...

alrededor de 20 horas ago | 0

| accepted

Answered

How can I change the linewidth in a pzmap?

This is one way fig = figure(); ax = axes(); s = tf('s'); G=s+3/((s+4)*(s^2+1)); pzmap(ax, G); l_zero = findall(ax, 'tag...

How can I change the linewidth in a pzmap?

This is one way fig = figure(); ax = axes(); s = tf('s'); G=s+3/((s+4)*(s^2+1)); pzmap(ax, G); l_zero = findall(ax, 'tag...

alrededor de 20 horas ago | 1

Answered

Count using mod function

The following example show how to find the even number in a vector using mod(). You can extend it to other cases x = [1 4 3 2 1...

Count using mod function

The following example show how to find the even number in a vector using mod(). You can extend it to other cases x = [1 4 3 2 1...

alrededor de 21 horas ago | 0

Answered

Additive White Gaussian Noise

You can generate the sine wave using sin() function: https://www.mathworks.com/help/matlab/ref/sin.html. Note that you can get a...

Additive White Gaussian Noise

You can generate the sine wave using sin() function: https://www.mathworks.com/help/matlab/ref/sin.html. Note that you can get a...

alrededor de 21 horas ago | 0

Answered

Averaging oscillating data points

Try lowpass filter if you have signal processing toolbox data = readmatrix('SampleTempData.xlsx'); t = data(:,1); x = data(...

Averaging oscillating data points

Try lowpass filter if you have signal processing toolbox data = readmatrix('SampleTempData.xlsx'); t = data(:,1); x = data(...

alrededor de 21 horas ago | 1

Answered

My Colored image gets read as a bw image

MATLAB is loading it as an indexed image: https://www.mathworks.com/help/images/image-types-in-the-toolbox.html#f14-17587. The f...

My Colored image gets read as a bw image

MATLAB is loading it as an indexed image: https://www.mathworks.com/help/images/image-types-in-the-toolbox.html#f14-17587. The f...

alrededor de 22 horas ago | 0

| accepted

Answered

syntax of matlab code

You can write-click on the name of the function and click open "Function name". It will take you to the corresponding function u...

syntax of matlab code

You can write-click on the name of the function and click open "Function name". It will take you to the corresponding function u...

1 día ago | 0

Answered

Entering Data to plot Graphs

Just entering as an array would be fine. See plot(): https://www.mathworks.com/help/matlab/ref/plot.html. Here is a very simple ...

Entering Data to plot Graphs

Just entering as an array would be fine. See plot(): https://www.mathworks.com/help/matlab/ref/plot.html. Here is a very simple ...

1 día ago | 0

Answered

How can I coding this function correctly?

Since this is a homework question so I won't be giving exact code, but you can read the documentation of the following functions...

How can I coding this function correctly?

Since this is a homework question so I won't be giving exact code, but you can read the documentation of the following functions...

1 día ago | 0

Answered

How to make a text figure close after an input command, how do I also make a text figure show up after an input command

You can use close() x = {'Choose the number you would like to solve'; '1 = Kinetic Energy';'2 = Potential Energy';'3 = Net Forc...

How to make a text figure close after an input command, how do I also make a text figure show up after an input command

You can use close() x = {'Choose the number you would like to solve'; '1 = Kinetic Energy';'2 = Potential Energy';'3 = Net Forc...

1 día ago | 0

Answered

The Eigenvalues of a large matrix don't cross each other when plotted

Yes, this is a very common problem with MATLAB's eig function, and John has created this excellent package to solve this problem...

The Eigenvalues of a large matrix don't cross each other when plotted

Yes, this is a very common problem with MATLAB's eig function, and John has created this excellent package to solve this problem...

1 día ago | 0

| accepted

Answered

perform matrix operation without for loop

Following code is equivalent xe = zeros([size(exp_data) numel(beta)]); mask = exp_data > 1.5; for m = 1:numel(beta) xes ...

perform matrix operation without for loop

Following code is equivalent xe = zeros([size(exp_data) numel(beta)]); mask = exp_data > 1.5; for m = 1:numel(beta) xes ...

1 día ago | 0

Answered

Can someone help me write a code to generate a random matrix like the one in the picture?

See blkdiag(): https://www.mathworks.com/help/matlab/ref/blkdiag.html. It is made specifically for this purpose. For example d ...

Can someone help me write a code to generate a random matrix like the one in the picture?

See blkdiag(): https://www.mathworks.com/help/matlab/ref/blkdiag.html. It is made specifically for this purpose. For example d ...

1 día ago | 1

| accepted

Answered

Set facecolor in app designer

No need to pass app.UIAxes in these lines set(pie(1),'facecolor',[255 85 180]./255); set(pie(2),'facecolor',[255 0 0]./255);

Set facecolor in app designer

No need to pass app.UIAxes in these lines set(pie(1),'facecolor',[255 85 180]./255); set(pie(2),'facecolor',[255 0 0]./255);

1 día ago | 0

| accepted

Answered

Calculating seasonal mean of precipitation from 25 years daily data

See retime(): https://www.mathworks.com/help/matlab/ref/timetable.retime.html

Calculating seasonal mean of precipitation from 25 years daily data

See retime(): https://www.mathworks.com/help/matlab/ref/timetable.retime.html

1 día ago | 0

| accepted

Answered

Diagonal slices of 3D array

The question is not entirely clear, so the following is my guess, but such a problem can be solved using sub2ind(). C = % 2N*N*...

Diagonal slices of 3D array

The question is not entirely clear, so the following is my guess, but such a problem can be solved using sub2ind(). C = % 2N*N*...

1 día ago | 1

Answered

Ues waitforbuttonpress for key press only

Instead of waitforbuttonpress, use KeyPress callback for the figure object: https://www.mathworks.com/help/matlab/ref/matlab.ui....

Ues waitforbuttonpress for key press only

Instead of waitforbuttonpress, use KeyPress callback for the figure object: https://www.mathworks.com/help/matlab/ref/matlab.ui....

1 día ago | 0

Answered

Direction between points from [0,360]

Add 2pi to negative values. x = -1; y = -1; theta = atan2(y, x); if theta < 0 theta = theta + 2*pi; end

Direction between points from [0,360]

Add 2pi to negative values. x = -1; y = -1; theta = atan2(y, x); if theta < 0 theta = theta + 2*pi; end

1 día ago | 0

Answered

How can I crop several regions from a video and plot all the signals of rgb values in the same graph?

Check this code vid = VideoReader('respiration.mp4'); I = cell(1, 3); rects = zeros(3, 4); numFrames = vid.NumFrames; % go...

How can I crop several regions from a video and plot all the signals of rgb values in the same graph?

Check this code vid = VideoReader('respiration.mp4'); I = cell(1, 3); rects = zeros(3, 4); numFrames = vid.NumFrames; % go...

1 día ago | 0

| accepted

Answered

Change filename of all files in folder to have underscore instead of space

Something like this d = uigetdir(pwd, 'Select a folder'); files = dir(fullfile(d, '*.s2p')); for i = 1:numel(files) or...

Change filename of all files in folder to have underscore instead of space

Something like this d = uigetdir(pwd, 'Select a folder'); files = dir(fullfile(d, '*.s2p')); for i = 1:numel(files) or...

1 día ago | 0