Community Profile # KSSV

Last seen: Today Active since 2011

Professional Interests: Mathematical Computing

#### Statistics

All
• • • • • • • • • • • • #### Content Feed

View by

Convert ezmesh to fmesh
v1 = rand(3,1) ; v2 = rand(3,1) ; h=fmesh(@(x,y)v1(1)*x+v2(1)*y,... % funx @(x,y)v1(2)*x+v2(2)*y,... % funy ...

2 hours ago | 0

Datasets with different Time series
Pick all the data to have same time and see if they have same dimensions. If they don't have same dimensions, get them to same d...

7 hours ago | 0

How to convert lat, long to NE?

8 hours ago | 0

I want to add number in given sequention
You can extract indices using: idx = 2:2:11 ;

24 hours ago | 0

How i can fix this issue in MATLAB?
idx = isnan(Phie) ; val = linspace(0.15,0.25,nnz(idx)) ; Phie(idx) = val ;

1 day ago | 0

Plotting results from "fitnlm" function
x = Torque ; y = predict(mdlfit,X) ; Z = predict(mdlfit,X)-Torque ; surf(x,y,Z)

1 day ago | 0

to fix plotting code
You are using white color to plot, so the plots are not visible. Change the line: plot(v,ifit,'w', v, lni,'ow') % Change the...

1 day ago | 1

| accepted

Calculate days between two given months
t0 = datetime(2021,1,1) ; t1 = datetime(2021,12,31) ; t = t0:t1

2 days ago | 0

Extending the vector length
Two options. Option 1:Use interpolation to extend the size. n = length(ch_x1_interval_1) ; x = 1:n ; xi = linspace(1,n,1816...

2 days ago | 0

extracting columns from arrays within a cell
% Demo data A = cell(8,1) ; for i = 1:8 A{i} = rand(2,1); end data = cell2mat(A')' ; data(:,2)

2 days ago | 1

Index in position 1 exceeds array bounds (must not exceed 61)
This error occurs, when you try to extract more number of elements then present in the array. A = rand(10,1) ; A(1) % no e...

2 days ago | 0

| accepted

How can i convert a excel table to a susbstructure?
T = readtable('myfile.xlsx') ; S = struct ; id = T.ID ; [C,ia,ib] = unique(id) ; for i = 1:length(C) S(i).Type = un...

2 days ago | 1

| accepted

Help needed on a Yahtzee game!
N = 10000 ; throwAgain = zeros(N,1) ; for i = 1:N throwAgain(i)=MCO_throwAgain() ; end histogram(throwAgain) functi...

2 days ago | 1

Index in position 1 is invalid. Array indices must be positive integers or logical values.
When you use ginput to extract the points, you may end up getting decimals and you are trying to index these points; as matlab i...

2 days ago | 0

| accepted

Trying to extract outliers from array

2 days ago | 0

| accepted

How do I fill the color in the block? This is the function I'm using.
Read about patch. hold on x = [4 5 5 4 4] y = [13 13 12 12 13] patch(x,y,'y') axis equal hold off hold on x = [4 4 5 5 4...

2 days ago | 1

| accepted

how can I plot a degree variable, a scalar and a date

3 days ago | 1

How to assign the value of the index to the index position?
v = [0 0 0 1 1 1 0 0 0]; idx = find(v) v(v==1) = find(v)

3 days ago | 1

| accepted

Compound quaternion Matlab -error
In this function: function t_q_pair_A_C = t_q_pair_compound(t_q_pair_A_B,t_q_pair_B_C) % Extract Translation Vectors t_...

3 days ago | 1

| accepted

Smaller values not seen in bar graph
You can go ahead like this right? X=[5 4 3]; Y=[1 7 8]; x = 1:3 ; bar(x,[X;Y]) Or you can try: bar([X' Y'],'stacked')

3 days ago | 1

Intensity of each pixel frawn on an image
Read about interp2. You can use interp2 for this. I = imread('figure63.png'); [m,n,p] = size(I) ; [X,Y] = meshgrid(1:n,1:m)...

3 days ago | 2

| accepted

How to solve 2 equations with 2 unknown variables and plot the result?
You need to convert the sym class to double using double. plot(double(alpha),double(E))

3 days ago | 0

I keep getting an error that says "unrecognized function or variable 'tspan'
You need to provide the time for which you want to integrate your ode. Call the function something like below: [t3,y3] = ode23(...

3 days ago | 0

my matlab doesn't recognize 'besselzero(...,...,...)', any help?
It is not a inbuilt function. You need to download it from the place you have reffereed it to. You can copy the function from th...

3 days ago | 0

| accepted

size mismatch in assigning values to a matrice
You need to initiliaze the matrices properly. A=[0.9974 0.0539;-0.1078 .1591]; B=[0.0013 0.0539]'; H=zeros(2); Q=[0.25 0;...

4 days ago | 0

Read specific column in .txt file

5 days ago | 0

Integration of a function
syms x f = 3*x-x^2 ; iwant = int(f,x)

5 days ago | 1

Not enough input arguments
It looks like you are running the code without giving the required inputs by hitting f5 or run button. No you should not. You sh...

5 days ago | 0