Answered
How to store the existing value in a array format. Here I have given the charging and discharging limits but it does not check it properly. can anyone help me to sort out this
f_SOC(i) = i_soc-(pevdchg*(i))/cev*100 %soc discharging equation May be you mean i_soc instead of temp in discharging cycl...

3 years ago | 0

Answered
why do i get an error in my code?
TT = load("stormData"); Load the data into variable nd use it in groupsummary summaryRegionCosts= groupsummary(TT, "...

3 years ago | 1

Answered
Kindly help me with this problem of groupsummary
TT = load("stormData"); summaryRegionCosts = groupsummary(TT, 'Region',{"min","max","median","mean"} , 'Total_Cost'); storm...

3 years ago | 0

Answered
Nested For Loop/Newton Raphson
x0 = 1.5; %x0 represents Mach Number Initial Guess AR = [1.8652 1.5472 1.3327 1.1793 1.0827 1.0258 1.0016 1.0302 1.1091 1.189...

3 years ago | 1

Answered
multiplication of matrices with different sizes
Use a cell array for s s{m}=(inv(C*o).*o.*PC.*inv(C.*o).*C);

3 years ago | 0

Answered
I can keep getting this error. Index exceeds the number of array elements. Index must not exceed 1.
t = zeros(1,t_reach); %hr X = zeros(1,t_reach); S = zeros(1,t_reach); P = zeros(1,t_reach); V = zeros(1,t_reach); Sa...

3 years ago | 0

Answered
How to convert das decimal number to binary code and directly write into matrix columns?
D = [0 4 3 7 2 5 6 7] F = dec2bin(D) % dec2bin use dec2bin function

3 years ago | 0

Answered
Getting outputs from a uifigure when a button is pressed
field1 = uidropdown(gui_fig,'Items',opt_list,'Editable','on','Position',[64 143 329 22],'Value','Text1'); uilabel(gui_fig,'te...

3 years ago | 0

Answered
How do I plot Streamlines of velocity components of spherical coordinate system?
verts = stream2(Xi,Yi,ui,vi,R,Th); streamline(verts);

3 years ago | 0

| accepted

Answered
How can i fix this code with ploting a function
fplot(@(x) 16*exp(0.25*x),[0 10]) % exp is exponential function,

3 years ago | 0

Answered
How can I create a solid line from the data within a for loop?
k =1; for i = 0:0.2:100 U(k) = 1.48/(U_rev + ((r1+d1)+(r2*T)+(d2*p))*(i*50) + (s * log((t*(i*50))+1))); F(k) = (((i*50)^2)/...

3 years ago | 0

| accepted

Answered
Unable to compute taylor expansion using taylortool
Since you are using a Edit box to read the function, it returns a string expression A = 1.176*x*cos(x); % A is variable to rea...

3 years ago | 0

| accepted

Answered
error getting unable to open file
Begin the filenames with characters , forcedisp1 = readtable("c2.csv"); % use characters first forcedisp2 = readtable("c3.csv...

3 years ago | 1

Answered
Matlab Coder error : converting datetime Format error
Use the dateType argument for the datetime function d1 = datetime(DateTime, 'dateType', 'yyyymmdd'); % use the dateType argume...

3 years ago | 0

| accepted

Answered
Hide the size of a table without using disp?
X = randi([0 10],10,1); Y = randi([0 100],10,1); % display table with size T = table(X,Y) % display table without showing s...

3 years ago | 0

Answered
integral command with function handle
May be you have function defined with a name integral. Check the working folder where you might have such function and which tak...

3 years ago | 0

| accepted

Answered
fouriertransform with piecewise function
use double and subs() the result of x figure(1); syms t x = piecewise(-1/2<=t<=1/2, 1-abs(t), t<-1/2, 0 , t>1/2, 0) fplot(x,...

3 years ago | 1

| accepted

Answered
How can I show the error message when the input data get wrong?
prompt = {'Start Year:','End Year:'}; dlgtitle = 'Year Range (Between 2000 and 2019)'; dims = [1 50]; answer = inputdlg(promp...

3 years ago | 0

| accepted

Answered
How can I merge the matrices that produce different dimensions in the loop
Use [ ] inside the loop for k = 1:10 A = rand(5,3); B = rand(6,3); C = rand(3,3); D = rand(2,3); Merge(:,:...

3 years ago | 0

Answered
hold on producing separate graphs
I = 1:10; figure x = I y1 = 4*I.^2 hold on plot(x,y1) % figure x = I y2 = 4*I.^1 hold on plot(x,y2) % figure x ...

3 years ago | 0

| accepted

Answered
I don't know how to make it repeat 10 times and save all input numbers into text file in a human readable format...Can anyone help me pls?? here's my the question and my code:
K = 1:10; for k = 1:numel(K) num = randi([-1 256],1); % input('Enter a number between 0 and 255:') disp("<"+num+">");...

3 years ago | 0

| accepted

Answered
Triangle, sawtooth plot
f = 1 t=0:0.01:5; y = 4*abs(f*t-[floor(f*t+1/2)])-1; plot(t,y) f = 0.2 t= 0:0.01:5; y = 2*(mod((f*t),1/2))*f - 1; plot(...

3 years ago | 0

| accepted

Answered
How do I plot this function A, i dont have syms so i need to plot it without that! Thanks!
clear all close all A = @(r) -.125*r+(1.125/r); figure(1); fplot(A,[-5 5])

3 years ago | 0

Answered
Plot an going down exponential curve by using values only
clear clc Vin=10; Vs=5; Vd=0.7; R1=2200; R2=3300; R3=linspace(0,1e5); x=R2/R1; for m=1:100 I(m)=R3(1,m)/R1; Vout(m)=(...

3 years ago | 0

Answered
MATLAB VECTOR FIELDS j COMPONENT
syms x y z i j k t r f = dot([x y z],[i j k]) ff = symfun(f,[x y z i j k]) subs(ff,{x y z},{1 0 0})

3 years ago | 1

Answered
Use a for loop to generate function arguments
data_i(i)=myfunction(d,d,d,...)

3 years ago | 0

Answered
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parenthe
fun = @(x) [0.00 0.00 0.01 -0.01 -0.01 -0.05 0.12 0.16 0.20 0.05 -0.02 0.11 0.06 0.04 -0.08 0.43 -0.26 -0.18 -0.12 -0.12]; ...

3 years ago | 0

Answered
Using listdlg, with muitlple selection to plot graphs
list = {'Rain','Sun','Snow','Wind'}; [indx,tf] = listdlg('ListString',list) if tf if strcmp(string(list(indx(1))),"Rai...

3 years ago | 0

| accepted

Load more