Réponse apportée
not getting a plot
%f plot(U_by_P,R,'r') Try above. You might want plot of R and U_by_P

environ 5 ans il y a | 1

Réponse apportée
simplification and preallocation of a symbolic value in matlab script
%if true vpa(BLOKS,4) Try something like above using _vpa_

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Retrieve vector within function file
function [dot,u] = fun(~,x) k = 1; p = 10; %x = x(1); x u = (-k.*x + x.^3 - p.*x.^2) ./ x; xdot = -x.^3 + p.*x.^2 + x.*u; ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to change length of profile on a plot
%if true clear all Use above command at beginning of program code.

environ 5 ans il y a | 0

| A accepté

Réponse apportée
I want to see the text & strings in a single line of Xlabel
%if true xlabel(['Timeseries' num2str(timestamp(end-1)) 'to' num2str(timestamp(end))]); Use num2str

environ 5 ans il y a | 1

Réponse apportée
Plotting problem of the different size vectors
%f true f=(400:10:2000)*1e6; for k=1:length(f) S(k)=20*sin(2*pi*f(k)); z=linspace(0,1/f(k),200); for m=1:length(z); x(m...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How can I convert the y-axis values to percentage from (0%-100%)?
Do you mean Z matrix values you plotted using contourf or similar function ? In that case, you normalize the Z matrix by divi...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Reading multiple editable text boxes and writing them into a single array
p1vals{K} = get(editp1(K), 'String' ); Why do you like to use complex variable,1i as cell array index, p1vals ?

environ 5 ans il y a | 0

| A accepté

Réponse apportée
I am lost. I need to be able to show the iterations to find the root with given a and b values. Values for a and b should be user inputted. Convergence tolerance of abs(b-a) < 0.0001. fprint used to output the results from each iteration.
clc; close all; f= @(x) x.^3 + 12*x.^2 - 100*x -6; %a = -1.0; %b = 0.0; a = input('enter value for a: '); b = input('en...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Matlab how to make a 3d plot of the following data
%if true mesh(0:30,0:30,solution) Try the above. If you have used %if true mesh(a,b,solution); It won't wor...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How can I fix this error: "Index exceeds the number of array elements (1)."?
%if true % The Aggregated Dead Zone (ADZ) Model, used to model transport between % two locations in a river system at a ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Help placing user input into an element in a row vector
%if true for i = 1 : data x(i) = input('Input a number: '); end Change the for loop structure as above

environ 5 ans il y a | 1

Réponse apportée
Multiples traces overlapping on multiple subplots
clear clc K = rand(16,800,40); for i = 1:16 subplot(16,1,i) % subplot(4,4,i) for j = 1:40 plot(K(i,:,j),'b-','linewi...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to fill grids?
clear clc x = 0:30; y = ones(1,length(x))*202 ylim(([0 1600])) plot(x,y,'b--','linewidth',4) xx = [0 30 30 0]; yy = [0 0 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How do I integrate two columns of discrete data?i need do operations between the data
for i=1:n % step=1 % F=x/y*(x+y); p(i)=(x(i)/y(i)*(x(i)+y(i)))/20;% frenquency=20 end P = sum(p); % use sum outside of loop ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to create a column table
vel=linspace(60,140,5); time=[1:0.5:3]; table(time.',vel.','VariableNames',{'Time','Velocity'}) Use transpose .' operator

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Merge Three Figures Into One
clear all; clc; hi=5.5*1e6; %heat input=5.5*10^(-6) Btu/h time=4200; %time=4200 hours cost=[4*1e-6,5*1e-6,6*1e-6]; %cost is ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to display the correct output of the product of matrix correctly when i wanted to conver degrees to radians
prompt = 'Enter the numbers for conversion? '; x = input(prompt) y = x*(pi./180); % formula to convert degrees to radians fpr...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How can I plot the uploaded csv file for each X value there are different Y values. as X = row 1 and Y = column 2 to 6? shown that in color waves .
clear A= xlsread('work.csv') plot(A(1,:),A(2:end,:),'linewidth',2)

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to change the answer into decimals
_poly2sym_ converts numeric vector to vector of symbolic equation and by default it uses the variable x. The values in vector ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
nested loops for 2 different variables
%if true clc;clear; a=0; c= linspace(200,1200,20); l= linspace(1,7,length(c)); for i=1:length(c) Cc(i) = (10*c(i))...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Why the legend color is wrong?
plot(inputX(:,2),inputY(:,2),'r',tcmxt,YM,'b',tcmxt,YS,'g'); inputX and inputY has multiple columns try the above

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to remove the brother top and right axes?
plot(1:10) ax = gca box(ax,'off')

plus de 5 ans il y a | 1

Réponse apportée
How can set the starting point of X-axes while using string in the x-axes?
%if true % if true x_axes={'Case-1','Case-2','Case-3','Case-4'} Y_axes=[4,5,6,7] figure('name','sample','PaperSize',[3....

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Plotting subplots in a for loop
clear all clc %% Rubber Material at different nodes data1 = importdata ('acc_1_rubber.mat'); data2 = importdata ('acc_2_rubb...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Fill a matrix using a for loop
Non_stim(k,m)=Cz_channel(Non_stim_index(n+k)); Use for loop index to store different values

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
help with integral2
%true fun = @(x,y) (2*x+sqrt(6)*y).*2.*x; % use dot polarfun = @(r,theta) fun(r.*cos(theta),r.^2.*cos(2.*theta)); q = ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Why the loop is not running?
%rue a =wt{i}; Use curly braces for strings

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Setting threshold in my plot
%true ylim([111 150]) Use this after plot command

plus de 5 ans il y a | 1

Réponse apportée
how to sum specific matrix elements?
%true Total=sum(A(A(:,2)<0))

plus de 5 ans il y a | 1

Charger plus