How can I add linspace in a For Loop

Technical Source
2 min readApr 17, 2023

--

Hello good day,

I wish to have a ‘for’ or ‘while’ loop which keeps increasing the value of ‘x’ as the value of ‘phi’ keeps increasing from 0–77.3049 with 100 numbers. I attempted a few times but kept getting errors. Any idea how this can be implemented?

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

There is not enough information (such as a description of what you want to do).

However one possibility is something like this —

phi = linspace(0, 77.3049, 100);
for k = 1:numel(phi)
x(k) = some_calculation_using(phi(k));
end

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet